#include "StaticObject.h"
LPDIRECT3DTEXTURE9 StaticObject::_itemImage;
StaticObject::StaticObject(int left,int top,int _kindOf_typeObj,int _typeBonus,QuadTree *_tree)
{
	this->_typeObj = Static_Object;
	this->_tree = _tree;
	this->_pRECT->left = left;
	this->_pRECT->top = top;
	this->_pRECT->bottom = top + 35;
	this->_pRECT->right = left + 35;
	switch (_typeObj)
	{
	case 0://grass
		_typeBonus=-1;
		_pRECT->right=_pRECT->left+GRASS_W;
		_pRECT->bottom=_pRECT->top+GRASS_H;
		_pRECT->left=left;
		_pSprite=new Sprites(_itemImage,true,_typeBonus,0,70,ITEMS_W,GRASS_H,left,_pRECT->bottom);
		_amountCoin=0;
		break;
	}
}
StaticObject::~StaticObject()
{

}
void StaticObject::Draw(int VirtualLeft,int Style)
{
	/*
	if(_pRECT->top < _posOld || _deltaY > 0)
	{
		_deltaY -- ;
		_pRECT->top ++;
		_pRECT->bottom ++;
		_pSprite->_top ++;
	}
	if(_pRECT->top == _posOld)
	{
		_check = true;
	}*/
	_pSprite->Draw(VirtualLeft, 0 ,true);
}
